<script>
	$(function() {
		$( "#tabs" ).tabs();
	});
    

</script>

<form id="form" action="<?=$_SERVER[ 'PHP_SELF' ]?>" method="post" enctype="multipart/form-data">
<div style="font-size:12px; width:98%" id="tabs">
	<ul>
		<li><a href="#tabs-1">Data Agen/Lokasi</a></li>
		<li><a href="#tabs-2">Data PIC</a></li>
		<?php
			if( $this->uri->segment(3) == "update" )
				echo '<li><a href="#tabs-3">Bank Data</a></li>';
		?>
		<?php
			if( $this->uri->segment(3) == "update" )
				echo '<li><a href="#tabs-4">Program</a></li>';
		?>
	</ul>
	<div id="tabs-1">
		<table width="100%">
			<tr>
				<td>
				<?php 
					$this->load->view( 'agents/agent' );
				?>
				</td>
			</tr>
		</table>
	</div>
	<div id="tabs-2">
		<table width="100%">
			<tr>
				<td>
				<?php 
					$this->load->view( 'agents/pic' );
				?>
				</td>
			</tr>
		</table>
        
	</div>
    <input type="checkbox" name="datastatus" value="1" style="margin-left: 20px;"> Data Sudah Lengkap<br>
	<div style="text-align: center; padding-bottom: 20px;">
            
			<input type="submit" value="Submit" />
			<input type="reset" value="Reset" />
	</div>
	<?php
	if( $this->uri->segment(3) == 'update' )
	{
		echo
			'<div id="tabs-3">
				<table width="100%">
					<tr>
					<td>';
		$this->load->view( "main_bank" );
		
		echo '</td>
					</tr>
				</table>
			</div>';
	
		echo
			'<div id="tabs-4">
				<table width="100%">
					<tr>
					<td>';
		// $this->load->view( "grid-program" );
		// ganti tampilan program untuk agent
		// yaddis@nutech 09/19/2012
		$this->load->view( "agents/agent_program" );
		
		echo '</td>
					</tr>
				</table>
			</div>';
	}
	?>
</form>